package com.xian.traverse;

public class ArrayDemo {
    public static void main(String[] args) {
        //目标：数组遍历
        int[] arr = {1,2,3};
        int sum = 0;
        for (int i = 0; i < arr.length; i++) {
//            System.out.println(arr[i]);
            sum += arr[i];
        }
        System.out.println(sum);
    }
}
